package com.henu.acmrating.config;

import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @Author XiaolongLi
 * @Description  配置文件内容，让静态方法读取
 * @Date 2020/7/4 15:01
 */
@Component
public class ConfigConstant {
    @Resource
    private Environment env;

    public static String driverPath;

    @PostConstruct
    public void readConfig() {
        driverPath = env.getProperty("prop.driver-path");
    }
}
